﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Model;

namespace DAL
{
    public  class SysDictionaryDAL:BaseDAL<SysDictionary>
    {
        public override string TableName
        {
            get { return "SysDictionary"; }
        }

        public override Dictionary<string, bool> PkName
        {
            get
            {

                Dictionary<string, bool> dic = new Dictionary<string, bool>();
                dic.Add("Dictionary_Id", true);
                return dic;
            }
        }
        public List<SysDictionary> GetLastList(SysDictionary dic)
        {
            string sql = "select top(1) * from SysDictionary where Dictionary_Type='"+dic.Dictionary_Type+"' order by  Dictionary_Number  desc";
            return DBHelper.ExecuteObjects<SysDictionary>(sql);
        }
    }
}
